<template>
    <div class="bottom-bar">
        <div :class="$route.meta.selected=='home'?'select':''">
            <router-link class="iconfont icon-home" to="/home" tag="span"></router-link>
            <div>首页</div>
        </div>
        <div :class="$route.meta.selected=='type'?'select':''">
            <router-link class="iconfont icon-type" to="/type" tag="span"></router-link>
            <div>分类</div>
        </div>
        <div :class="$route.meta.selected=='cart'?'select':''">
            <router-link class="iconfont icon-cart" to="/cart" tag="span"></router-link>
            <div>购物车</div>
        </div>
        <div :class="$route.meta.selected=='about'?'select':''">
            <router-link class="iconfont icon-about" to="/about" tag="span"></router-link>
            <div>关于我</div>
        </div>
        <!-- <div> {{$store.state.msg}} </div>
        <div>{{msg}}</div>
        <div>{{arr}}</div>
        <input type="text" :value="msg" @input="setMsg($event.target.value)"> -->
    </div>
</template>
<script>
// import {mapState,mapMutations} from 'vuex'
export default {
    data() {
        return {
           
        }
    },
    methods: {
        // printStore(){
        //     console.log(this.$store);
        //     console.log(this.$store.state.msg);
        // }
        // ...mapMutations(["setMsg"])
    },
    computed: {
        // ...mapState( ["msg","arr"] )
    },
    mounted() {
        // this.printStore();
    },
};
</script>

<style lang="less" scoped>
.select {
    color: @pink;
}
.bottom-bar {
    width: 100vw;
    height: @h;
    border-top: 1px solid @de;
    position: fixed;
    bottom: 0;
    left: 0;
    display: flex;
    flex-flow: row nowrap;
    background-color: @white;
    z-index: 800;
    > div {
        flex-grow: 1;
        text-align: center;
        line-height: 1.25;
        span {
            font-size: @iconSize;
        }
        div {
            font-size: 26px;
        }
    }
}
</style>